<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        /* 这个两个必须写在父元素里 
            让子元素保留立体空间
            transform-style:preserve-3d ;
             透视  单位是像素
             transform: perspective();
            */
            body{
                perspective: 350px;
            }
        .box{
            transform-style:preserve-3d ;
            position: relative;
            margin: 0 auto;
            width: 400px;
            height: 400px;
            text-align: center;
            line-height: 400px;
            transition: all .5s;
        }
        .box:hover{
            /* 旋转 */
            transform: rotateY(180deg);
        }
        .box div{
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
             
        }
        .box .div1{
             background-color: pink;
             transform:translateZ(1px);
        }
        .box .div2{
            background-color: aqua;
              /* 旋转180度 */
            transform: rotateY(180deg);
        }
    </style>

</head>
<body>
    <div class="box">
        <div class="div1">你猜我是谁</div>
        <div class="div2">赵玉真</div>
    </div>
</body>
</html>